package my.yuan.fkzcommon.exception;

import my.yuan.fkzcommon.domain.code.ICode;

/**
 * @author qy
 * @description GenericException
 * @date 2021-10-01
 */
public class GenericException extends RuntimeException {
    /**
     * 错误
     */
    private final ICode code;

    public GenericException(ICode code) {
        super(code.getMessage());
        this.code = code;
    }

    public GenericException(String message, ICode code) {
        super(message);
        this.code = code;
    }


    public ICode getCode() {
        return code;
    }
}
